package com.shycloud.mido.member.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shycloud.mido.member.api.vo.TeacherCourseVO;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.common.core.util.R;
import com.shycloud.mido.member.api.vo.AppPayOnlineCourseVO;
import com.shycloud.mido.member.api.vo.OnlineCoursePeriodVO;
import com.shycloud.mido.member.api.vo.OnlineCourseRecordVO;
import com.shycloud.mido.member.api.vo.OnlineCourseRequestVO;
import com.shycloud.mido.member.api.vo.OnlineCourseScheduleVO;
import com.shycloud.mido.member.api.vo.OnlineCourseTrialInfoReturnVO;
import com.shycloud.mido.member.api.vo.RoomInfo;

/**
 * @author Xiaoxing Yu
 * @date 2020/10/15
 **/
public interface OnlineCourseService {

	R accessRoom(String memberId, OnlineCourseRequestVO requestVO);

	R exitRoom(String memberId, OnlineCourseRequestVO requestVO);

	R updateHeartbeat(String memberId, OnlineCourseRequestVO requestVO);

	List<OnlineCourseRecordVO> getCourseRecord(String studentId, String teacherId, Integer year, Integer month);

	List<OnlineCourseRecordVO> getCourseRecordByDate(String studentId, String teacherId, String dateStr);

	R addCourseRecord(String memberId, OnlineCourseRecordVO recordVO);

	Integer getAvailTime(String studentId);

	Boolean updateAvailTime(String studentId, Integer delta);

	Boolean addAccumulcateTime(String studentId, Integer delta);

	Integer getAccumulcateTime(String studentId);

	Map getAvailTimeAndAccuTime(String studentId);

	RoomInfo generateRTCTokenAndRoomInfo();

	String checkIfHasToken(String teacherId, String studentId, Integer type);

//	String checkLeavingStatus(String teacherId, String studentId, Integer type);

	R resetHeartBeatData(OnlineCourseRequestVO requestVO);

	R getPeriodByDate(String studentId, String teacherId, String dateStr);

	R addSchedule(OnlineCourseScheduleVO requestVO);

	R editSchedule(OnlineCourseScheduleVO requestVO);

	R deleteSchedule(OnlineCourseScheduleVO requestVO);

	R getScheduleMonthly(Integer year, Integer month, String teacherId, String studentId);

	R getScheduleWeekly(String mondayDateStr, String teacherId, String studentId);

	Map getStudentInfo(String studentId, String teacherId, Integer type);

	Integer getOrgAvailTime(String studentId);

	List<OnlineCourseRecordVO> getCourseDetailRecord(String studentId, String teacherId, Integer year, Integer month);

	Map pageCoursePeriodByTimeDesc(Page<OnlineCoursePeriodVO> page, String studentId, String teacherId);

	OnlineCourseTrialInfoReturnVO getTrialInfo(String memberId);

	R claimTrial(String memberId);

	R consumeTrialTime(String memberId, Integer consumed);

	R claimTrialBonus(String memberId);

	R createTrialRoom(String teacherMemberId, OnlineCourseRequestVO requestVO);

	R checkTrialRoom(String memberId, OnlineCourseRequestVO requestVO);

	R getTrialRoomPassword(String trialRoomShowId);

	List<AppPayOnlineCourseVO> getGoodsList();

	List<TeacherCourseVO> getOrgTeacherCourseList(Integer orgId);

	IPage<OnlineCoursePeriodVO> getTeacherCourseDetail(Page page, String teacherId);

}
